/*
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations
 * under the License.
 * 
 * The Original Code is iSQL-Viewer, A Mutli-Platform Database Tool.
 *
 * The Initial Developer of the Original Code is iSQL-Viewer, A Mutli-Platform Database Tool.
 * Portions created by Mark A. Kobold are Copyright (C) 2000-2007. All Rights Reserved.
 *
 * Contributor(s): 
 *  Mark A. Kobold [mkobold <at> isqlviewer <dot> com].
 *  
 * If you didn't download this code from the following link, you should check
 * if you aren't using an obsolete version: http://www.isqlviewer.com
 */
package org.isqlviewer.sql;

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;

import org.isqlviewer.util.LocalMessages;

/**
 * TODO Add DatabaseMetadataWrapper Overview JavaDoc.
 * <p>
 * 
 * @author Mark A. Kobold &lt;mkobold at isqlviewer dot com&gt;
 * @version 1.0
 */
class DatabaseMetadataWrapper implements DatabaseMetaData {

    static final String BUNDLE_NAME = "org.isqlviewer.sql.ResourceBundle";
    private static final LocalMessages messages = new LocalMessages(BUNDLE_NAME);
    private DatabaseMetaData metaData = null;
    private ConnectionWrapper connection = null;

    public DatabaseMetadataWrapper(ConnectionWrapper connection, DatabaseMetaData metaData) {

        this.connection = connection;
        this.metaData = metaData;
    }

    public boolean allProceduresAreCallable() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.allProceduresAreCallable();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "allProceduresAreCallable()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "allProceduresAreCallable()");
            throw sqle;
        }
    }

    public boolean allTablesAreSelectable() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.allTablesAreSelectable();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "allTablesAreSelectable()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "allTablesAreSelectable()");
            throw sqle;
        }
    }

    public boolean dataDefinitionCausesTransactionCommit() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.dataDefinitionCausesTransactionCommit();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "dataDefinitionCausesTransactionCommit()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "dataDefinitionCausesTransactionCommit()");
            throw sqle;
        }
    }

    public boolean dataDefinitionIgnoredInTransactions() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.dataDefinitionIgnoredInTransactions();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "dataDefinitionIgnoredInTransactions()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "dataDefinitionIgnoredInTransactions()");
            throw sqle;
        }
    }

    public boolean deletesAreDetected(int type) throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.deletesAreDetected(type);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "deletesAreDetected(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "deletesAreDetected(int)");
            throw sqle;
        }
    }

    public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.doesMaxRowSizeIncludeBlobs();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "doesMaxRowSizeIncludeBlobs()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "doesMaxRowSizeIncludeBlobs()");
            throw sqle;
        }
    }

    public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern,
            String attributeNamePattern) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getAttributes(catalog, schemaPattern, typeNamePattern, attributeNamePattern);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getAttributes(String,String,String,String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getAttributes(String,String,String,String)");
            throw sqle;
        }
    }

    public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getBestRowIdentifier(catalog, schema, table, scope, nullable);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError",
                    "getBestRowIdentifier(String,String,String,int,boolean)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t,
                    "getBestRowIdentifier(String,String,String,int,boolean)");
            throw sqle;
        }
    }

    public ResultSet getCatalogs() throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getCatalogs();
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getCatalogs()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getCatalogs()");
            throw sqle;
        }
    }

    public String getCatalogSeparator() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getCatalogSeparator();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getCatalogSeparator()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getCatalogSeparator()");
            throw sqle;
        }
    }

    public String getCatalogTerm() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getCatalogTerm();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getCatalogTerm()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getCatalogTerm()");
            throw sqle;
        }
    }

    public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getColumnPrivileges(catalog, schema, table, columnNamePattern);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getColumnPrivileges(String,String,String,String)"),
                    sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t,
                    "getColumnPrivileges(String,String,String,String)");
            throw sqle;
        }
    }

    public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getColumns(catalog, schemaPattern, tableNamePattern, columnNamePattern);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getColumns(String,String,String,String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getColumns(String,String,String,String)");
            throw sqle;
        }
    }

    public Connection getConnection() throws SQLException {

        connection.updateLastAccess();
        try {
            return connection;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getConnection()");
            throw sqle;
        }
    }

    public ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable,
            String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getCrossReference(primaryCatalog, primarySchema, primaryTable, foreignCatalog,
                    foreignSchema, foreignTable);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError",
                    "getCrossReference(String,String,String,String,String,String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t,
                    "getCrossReference(String,String,String,String,String,String)");
            throw sqle;
        }
    }

    public int getDatabaseMajorVersion() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getDatabaseMajorVersion();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getDatabaseMajorVersion()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getDatabaseMajorVersion()");
            throw sqle;
        }
    }

    public int getDatabaseMinorVersion() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getDatabaseMinorVersion();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getDatabaseMinorVersion()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getDatabaseMinorVersion()");
            throw sqle;
        }
    }

    public String getDatabaseProductName() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getDatabaseProductName();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getDatabaseProductName()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getDatabaseProductName()");
            throw sqle;
        }
    }

    public String getDatabaseProductVersion() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getDatabaseProductVersion();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getDatabaseProductVersion()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getDatabaseProductVersion()");
            throw sqle;
        }
    }

    public int getDefaultTransactionIsolation() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getDefaultTransactionIsolation();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getDefaultTransactionIsolation()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getDefaultTransactionIsolation()");
            throw sqle;
        }
    }

    public int getDriverMajorVersion() {

        return metaData.getDriverMajorVersion();
    }

    public int getDriverMinorVersion() {

        return metaData.getDriverMinorVersion();
    }

    public String getDriverName() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getDriverName();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getDriverName()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getDriverName()");
            throw sqle;
        }
    }

    public String getDriverVersion() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getDriverVersion();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getDriverVersion()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getDriverVersion()");
            throw sqle;
        }
    }

    public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getExportedKeys(catalog, schema, table);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getExportedKeys(String,String,String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getExportedKeys(String,String,String)");
            throw sqle;
        }
    }

    public String getExtraNameCharacters() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getExtraNameCharacters();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getExtraNameCharacters()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getExtraNameCharacters()");
            throw sqle;
        }
    }

    public String getIdentifierQuoteString() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getIdentifierQuoteString();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getIdentifierQuoteString()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getIdentifierQuoteString()");
            throw sqle;
        }
    }

    public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getImportedKeys(catalog, schema, table);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getImportedKeys(String,String,String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getImportedKeys(String,String,String)");
            throw sqle;
        }
    }

    public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getIndexInfo(catalog, schema, table, unique, approximate);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages
                    .format("DataSource.GeneralMethodError", "getIndexInfo(String,String,String,boolean,boolean)"),
                    sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t,
                    "getIndexInfo(String,String,String,boolean,boolean)");
            throw sqle;
        }
    }

    public int getJDBCMajorVersion() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getJDBCMajorVersion();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getJDBCMajorVersion()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getJDBCMajorVersion()");
            throw sqle;
        }
    }

    public int getJDBCMinorVersion() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getJDBCMinorVersion();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getJDBCMinorVersion()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getJDBCMinorVersion()");
            throw sqle;
        }
    }

    public int getMaxBinaryLiteralLength() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxBinaryLiteralLength();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxBinaryLiteralLength()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxBinaryLiteralLength()");
            throw sqle;
        }
    }

    public int getMaxCatalogNameLength() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxCatalogNameLength();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxCatalogNameLength()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxCatalogNameLength()");
            throw sqle;
        }
    }

    public int getMaxCharLiteralLength() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxCharLiteralLength();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxCharLiteralLength()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxCharLiteralLength()");
            throw sqle;
        }
    }

    public int getMaxColumnNameLength() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxColumnNameLength();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxColumnNameLength()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxColumnNameLength()");
            throw sqle;
        }
    }

    public int getMaxColumnsInGroupBy() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxColumnsInGroupBy();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxColumnsInGroupBy()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxColumnsInGroupBy()");
            throw sqle;
        }
    }

    public int getMaxColumnsInIndex() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxColumnsInIndex();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxColumnsInIndex()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxColumnsInIndex()");
            throw sqle;
        }
    }

    public int getMaxColumnsInOrderBy() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxColumnsInOrderBy();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxColumnsInOrderBy()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxColumnsInOrderBy()");
            throw sqle;
        }
    }

    public int getMaxColumnsInSelect() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxColumnsInSelect();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxColumnsInSelect()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxColumnsInSelect()");
            throw sqle;
        }
    }

    public int getMaxColumnsInTable() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxColumnsInTable();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxColumnsInTable()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxColumnsInTable()");
            throw sqle;
        }
    }

    public int getMaxConnections() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxConnections();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxConnections()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxConnections()");
            throw sqle;
        }
    }

    public int getMaxCursorNameLength() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxCursorNameLength();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxCursorNameLength()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxCursorNameLength()");
            throw sqle;
        }
    }

    public int getMaxIndexLength() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxIndexLength();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getProcedureTerm()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getProcedureTerm()");
            throw sqle;
        }
    }

    public int getMaxProcedureNameLength() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxProcedureNameLength();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxProcedureNameLength()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxProcedureNameLength()");
            throw sqle;
        }
    }

    public int getMaxRowSize() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxRowSize();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxRowSize()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxRowSize()");
            throw sqle;
        }
    }

    public int getMaxSchemaNameLength() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxSchemaNameLength();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxSchemaNameLength()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxSchemaNameLength()");
            throw sqle;
        }
    }

    public int getMaxStatementLength() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxStatementLength();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxStatementLength()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxStatementLength()");
            throw sqle;
        }
    }

    public int getMaxStatements() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxStatements();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxStatements()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxStatements()");
            throw sqle;
        }
    }

    public int getMaxTableNameLength() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxTableNameLength();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxTableNameLength()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxTableNameLength()");
            throw sqle;
        }
    }

    public int getMaxTablesInSelect() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxTablesInSelect();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxTablesInSelect()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxTablesInSelect()");
            throw sqle;
        }
    }

    public int getMaxUserNameLength() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getMaxUserNameLength();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMaxUserNameLength()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMaxUserNameLength()");
            throw sqle;
        }
    }

    public String getNumericFunctions() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getNumericFunctions();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getNumericFunctions()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getNumericFunctions()");
            throw sqle;
        }
    }

    public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getPrimaryKeys(catalog, schema, table);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getPrimaryKeys(String,String,String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getPrimaryKeys(String,String,String)");
            throw sqle;
        }
    }

    public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern,
            String columnNamePattern) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getProcedureColumns(catalog, schemaPattern, procedureNamePattern,
                    columnNamePattern);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getProcedureColumns(String,String,String,String)"),
                    sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t,
                    "getProcedureColumns(String,String,String,String)");
            throw sqle;
        }
    }

    public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getProcedures(catalog, schemaPattern, procedureNamePattern);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getProcedures(String,String,String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getProcedures(String,String,String)");
            throw sqle;
        }
    }

    public String getProcedureTerm() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getProcedureTerm();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getProcedureTerm()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getProcedureTerm()");
            throw sqle;
        }
    }

    public int getResultSetHoldability() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getResultSetHoldability();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getResultSetHoldability()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getResultSetHoldability()");
            throw sqle;
        }
    }

    public ResultSet getSchemas() throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getSchemas();
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getSchemas()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getSchemas()");
            throw sqle;
        }
    }

    public String getSchemaTerm() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getSchemaTerm();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getSchemaTerm()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getSchemaTerm()");
            throw sqle;
        }
    }

    public String getSearchStringEscape() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getSearchStringEscape();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getSearchStringEscape()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getSearchStringEscape()");
            throw sqle;
        }
    }

    public String getSQLKeywords() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getSQLKeywords();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getSQLKeywords()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getSQLKeywords()");
            throw sqle;
        }
    }

    public int getSQLStateType() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getSQLStateType();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getSQLStateType()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getSQLStateType()");
            throw sqle;
        }
    }

    public String getStringFunctions() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getStringFunctions();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getStringFunctions()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getStringFunctions()");
            throw sqle;
        }
    }

    public ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getSuperTables(catalog, schemaPattern, tableNamePattern);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getSuperTables(String,String,String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getSuperTables(String,String,String)");
            throw sqle;
        }
    }

    public ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getSuperTypes(catalog, schemaPattern, typeNamePattern);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getSuperTypes(String,String,String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getSuperTypes(String,String,String)");
            throw sqle;
        }
    }

    public String getSystemFunctions() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getSystemFunctions();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getSystemFunctions()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getSystemFunctions()");
            throw sqle;
        }
    }

    public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getTablePrivileges(catalog, schemaPattern, tableNamePattern);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getTablePrivileges(String,String,String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getTablePrivileges(String,String,String)");
            throw sqle;
        }
    }

    public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getTables(catalog, schemaPattern, tableNamePattern, types);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getTables(String,String,String,String[])"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getTables(String,String,String,String[])");
            throw sqle;
        }
    }

    public ResultSet getTableTypes() throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getTableTypes();
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getTableTypes()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getTableTypes()");
            throw sqle;
        }
    }

    public String getTimeDateFunctions() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getTimeDateFunctions();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getTimeDateFunctions()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getTimeDateFunctions()");
            throw sqle;
        }
    }

    public ResultSet getTypeInfo() throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getTypeInfo();
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getTypeInfo()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getTypeInfo()");
            throw sqle;
        }
    }

    public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getUDTs(catalog, schemaPattern, typeNamePattern, types);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getUDTs(Strin,String,String,int[])"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getUDTs(Strin,String,String,int[])");
            throw sqle;
        }
    }

    public String getURL() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getURL();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getURL()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getURL()");
            throw sqle;
        }
    }

    public String getUserName() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.getUserName();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getUserName()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getUserName()");
            throw sqle;
        }
    }

    public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException {

        connection.updateLastAccess();
        try {
            ResultSet set = metaData.getVersionColumns(catalog, schema, table);
            StatementWrapper statement = new StatementWrapper(connection, set.getStatement(), "");
            ResultSetWrapper wrs = new ResultSetWrapper(statement, set);
            return wrs;
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getVersionColumns(String,String,String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getVersionColumns(String,String,String)");
            throw sqle;
        }
    }

    public boolean insertsAreDetected(int type) throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.insertsAreDetected(type);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "insertsAreDetected(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "insertsAreDetected(int)");
            throw sqle;
        }
    }

    public boolean isCatalogAtStart() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.isCatalogAtStart();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "isCatalogAtStart()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "isCatalogAtStart()");
            throw sqle;
        }
    }

    public boolean isReadOnly() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.isReadOnly();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "isReadOnly()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "isReadOnly()");
            throw sqle;
        }
    }

    public boolean locatorsUpdateCopy() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.locatorsUpdateCopy();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "locatorsUpdateCopy()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "locatorsUpdateCopy()");
            throw sqle;
        }
    }

    public boolean nullPlusNonNullIsNull() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.nullPlusNonNullIsNull();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "nullPlusNonNullIsNull()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "nullPlusNonNullIsNull()");
            throw sqle;
        }
    }

    public boolean nullsAreSortedAtEnd() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.nullsAreSortedAtEnd();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "nullsAreSortedAtEnd()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "nullsAreSortedAtEnd()");
            throw sqle;
        }
    }

    public boolean nullsAreSortedAtStart() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.nullsAreSortedAtStart();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "nullsAreSortedAtStart()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "nullsAreSortedAtStart()");
            throw sqle;
        }
    }

    public boolean nullsAreSortedHigh() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.nullsAreSortedHigh();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "nullsAreSortedHigh()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "nullsAreSortedHigh()");
            throw sqle;
        }
    }

    public boolean nullsAreSortedLow() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.nullsAreSortedLow();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "nullsAreSortedLow()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "nullsAreSortedLow()");
            throw sqle;
        }
    }

    public boolean othersDeletesAreVisible(int type) throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.othersDeletesAreVisible(type);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "othersDeletesAreVisible(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "othersDeletesAreVisible(int)");
            throw sqle;
        }
    }

    public boolean othersInsertsAreVisible(int type) throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.othersInsertsAreVisible(type);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "othersInsertsAreVisible(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "othersInsertsAreVisible(int)");
            throw sqle;
        }
    }

    public boolean othersUpdatesAreVisible(int type) throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.othersUpdatesAreVisible(type);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "othersUpdatesAreVisible(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "othersUpdatesAreVisible(int)");
            throw sqle;
        }
    }

    public boolean ownDeletesAreVisible(int type) throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.ownDeletesAreVisible(type);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "ownDeletesAreVisible(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "ownDeletesAreVisible(int)");
            throw sqle;
        }
    }

    public boolean ownInsertsAreVisible(int type) throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.ownInsertsAreVisible(type);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "ownInsertsAreVisible(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "ownInsertsAreVisible(int)");
            throw sqle;
        }
    }

    public boolean ownUpdatesAreVisible(int type) throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.ownUpdatesAreVisible(type);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "ownUpdatesAreVisible(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "ownUpdatesAreVisible(int)");
            throw sqle;
        }
    }

    public boolean storesLowerCaseIdentifiers() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.storesLowerCaseIdentifiers();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "storesLowerCaseIdentifiers()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "storesLowerCaseIdentifiers()");
            throw sqle;
        }
    }

    public boolean storesLowerCaseQuotedIdentifiers() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.storesLowerCaseQuotedIdentifiers();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "storesLowerCaseQuotedIdentifiers()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "storesLowerCaseQuotedIdentifiers()");
            throw sqle;
        }
    }

    public boolean storesMixedCaseIdentifiers() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.storesMixedCaseIdentifiers();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "storesMixedCaseIdentifiers()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "storesMixedCaseIdentifiers()");
            throw sqle;
        }
    }

    public boolean storesMixedCaseQuotedIdentifiers() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.storesMixedCaseQuotedIdentifiers();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "storesMixedCaseQuotedIdentifiers()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "storesMixedCaseQuotedIdentifiers()");
            throw sqle;
        }
    }

    public boolean storesUpperCaseIdentifiers() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.storesUpperCaseIdentifiers();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "storesUpperCaseIdentifiers()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "storesUpperCaseIdentifiers()");
            throw sqle;
        }
    }

    public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.storesUpperCaseQuotedIdentifiers();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "storesUpperCaseQuotedIdentifiers()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "storesUpperCaseQuotedIdentifiers()");
            throw sqle;
        }
    }

    public boolean supportsAlterTableWithAddColumn() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsAlterTableWithAddColumn();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsAlterTableWithAddColumn()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsAlterTableWithAddColumn()");
            throw sqle;
        }
    }

    public boolean supportsAlterTableWithDropColumn() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsAlterTableWithDropColumn();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsAlterTableWithDropColumn()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsAlterTableWithDropColumn()");
            throw sqle;
        }
    }

    public boolean supportsANSI92EntryLevelSQL() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsANSI92EntryLevelSQL();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsANSI92EntryLevelSQL()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsANSI92EntryLevelSQL()");
            throw sqle;
        }
    }

    public boolean supportsANSI92FullSQL() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsANSI92FullSQL();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsANSI92FullSQL()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsANSI92FullSQL()");
            throw sqle;
        }
    }

    public boolean supportsANSI92IntermediateSQL() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsANSI92IntermediateSQL();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsANSI92IntermediateSQL()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsANSI92IntermediateSQL()");
            throw sqle;
        }
    }

    public boolean supportsBatchUpdates() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsBatchUpdates();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsBatchUpdates()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsBatchUpdates()");
            throw sqle;
        }
    }

    public boolean supportsCatalogsInDataManipulation() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsCatalogsInDataManipulation();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsCatalogsInDataManipulation()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsCatalogsInDataManipulation()");
            throw sqle;
        }
    }

    public boolean supportsCatalogsInIndexDefinitions() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsCatalogsInIndexDefinitions();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsCatalogsInIndexDefinitions()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsCatalogsInIndexDefinitions()");
            throw sqle;
        }
    }

    public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsCatalogsInPrivilegeDefinitions();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsCatalogsInPrivilegeDefinitions()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsCatalogsInPrivilegeDefinitions()");
            throw sqle;
        }
    }

    public boolean supportsCatalogsInProcedureCalls() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsCatalogsInProcedureCalls();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsCatalogsInProcedureCalls()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsCatalogsInProcedureCalls()");
            throw sqle;
        }
    }

    public boolean supportsCatalogsInTableDefinitions() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsCatalogsInTableDefinitions();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsCatalogsInTableDefinitions()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsCatalogsInTableDefinitions()");
            throw sqle;
        }
    }

    public boolean supportsColumnAliasing() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsColumnAliasing();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsColumnAliasing()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsColumnAliasing()");
            throw sqle;
        }
    }

    public boolean supportsConvert() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsConvert();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsConvert()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsConvert()");
            throw sqle;
        }
    }

    public boolean supportsConvert(int fromType, int toType) throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsConvert(fromType, toType);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsConvert(int,int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsConvert(int,int)");
            throw sqle;
        }
    }

    public boolean supportsCoreSQLGrammar() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsCoreSQLGrammar();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsCoreSQLGrammar()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsCoreSQLGrammar()");
            throw sqle;
        }
    }

    public boolean supportsCorrelatedSubqueries() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsCorrelatedSubqueries();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsCorrelatedSubqueries()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsCorrelatedSubqueries()");
            throw sqle;
        }
    }

    public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsDataDefinitionAndDataManipulationTransactions();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError",
                    "supportsDataDefinitionAndDataManipulationTransactions()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t,
                    "supportsDataDefinitionAndDataManipulationTransactions()");
            throw sqle;
        }
    }

    public boolean supportsDataManipulationTransactionsOnly() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsDataManipulationTransactionsOnly();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsDataManipulationTransactionsOnly()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsDataManipulationTransactionsOnly()");
            throw sqle;
        }
    }

    public boolean supportsDifferentTableCorrelationNames() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsDifferentTableCorrelationNames();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsDifferentTableCorrelationNames()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsDifferentTableCorrelationNames()");
            throw sqle;
        }
    }

    public boolean supportsExpressionsInOrderBy() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsExpressionsInOrderBy();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsExpressionsInOrderBy()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsExpressionsInOrderBy()");
            throw sqle;
        }
    }

    public boolean supportsExtendedSQLGrammar() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsExtendedSQLGrammar();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsExtendedSQLGrammar()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsExtendedSQLGrammar()");
            throw sqle;
        }
    }

    public boolean supportsFullOuterJoins() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsFullOuterJoins();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsFullOuterJoins()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsFullOuterJoins()");
            throw sqle;
        }
    }

    public boolean supportsGetGeneratedKeys() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsGetGeneratedKeys();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsGetGeneratedKeys()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsGetGeneratedKeys()");
            throw sqle;
        }
    }

    public boolean supportsGroupBy() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsGroupBy();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsGroupBy()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsGroupBy()");
            throw sqle;
        }
    }

    public boolean supportsGroupByBeyondSelect() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsGroupByBeyondSelect();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsGroupByBeyondSelect()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsGroupByBeyondSelect()");
            throw sqle;
        }
    }

    public boolean supportsGroupByUnrelated() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsGroupByUnrelated();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsGroupByUnrelated()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsGroupByUnrelated()");
            throw sqle;
        }
    }

    public boolean supportsIntegrityEnhancementFacility() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsIntegrityEnhancementFacility();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsIntegrityEnhancementFacility()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsIntegrityEnhancementFacility()");
            throw sqle;
        }
    }

    public boolean supportsLikeEscapeClause() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsLikeEscapeClause();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsLikeEscapeClause()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsLikeEscapeClause()");
            throw sqle;
        }
    }

    public boolean supportsLimitedOuterJoins() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsLimitedOuterJoins();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsLimitedOuterJoins()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsLimitedOuterJoins()");
            throw sqle;
        }
    }

    public boolean supportsMinimumSQLGrammar() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsMinimumSQLGrammar();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsMinimumSQLGrammar()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsMinimumSQLGrammar()");
            throw sqle;
        }
    }

    public boolean supportsMixedCaseIdentifiers() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsMixedCaseIdentifiers();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsMixedCaseIdentifiers()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsMixedCaseIdentifiers()");
            throw sqle;
        }
    }

    public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsMixedCaseQuotedIdentifiers();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsMixedCaseQuotedIdentifiers()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsMixedCaseQuotedIdentifiers()");
            throw sqle;
        }
    }

    public boolean supportsMultipleOpenResults() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsMultipleOpenResults();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsMultipleOpenResults()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsMultipleOpenResults()");
            throw sqle;
        }
    }

    public boolean supportsMultipleResultSets() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsMultipleResultSets();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsMultipleResultSets()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsMultipleResultSets()");
            throw sqle;
        }
    }

    public boolean supportsMultipleTransactions() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsMultipleTransactions();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsMultipleTransactions()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsMultipleTransactions()");
            throw sqle;
        }
    }

    public boolean supportsNamedParameters() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsNamedParameters();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsNamedParameters()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsNamedParameters()");
            throw sqle;
        }
    }

    public boolean supportsNonNullableColumns() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsNonNullableColumns();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsNonNullableColumns()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsNonNullableColumns()");
            throw sqle;
        }
    }

    public boolean supportsOpenCursorsAcrossCommit() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsOpenCursorsAcrossCommit();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsOpenCursorsAcrossCommit()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsOpenCursorsAcrossCommit()");
            throw sqle;
        }
    }

    public boolean supportsOpenCursorsAcrossRollback() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsOpenCursorsAcrossRollback();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsOpenCursorsAcrossRollback()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsOpenCursorsAcrossRollback()");
            throw sqle;
        }
    }

    public boolean supportsOpenStatementsAcrossCommit() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsOpenStatementsAcrossCommit();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsOpenStatementsAcrossCommit()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsOpenStatementsAcrossCommit()");
            throw sqle;
        }
    }

    public boolean supportsOpenStatementsAcrossRollback() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsOpenStatementsAcrossRollback();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsOpenStatementsAcrossRollback()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsOpenStatementsAcrossRollback()");
            throw sqle;
        }
    }

    public boolean supportsOrderByUnrelated() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsOrderByUnrelated();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsOrderByUnrelated()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsOrderByUnrelated()");
            throw sqle;
        }
    }

    public boolean supportsOuterJoins() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsOuterJoins();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsOuterJoins()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsOuterJoins()");
            throw sqle;
        }
    }

    public boolean supportsPositionedDelete() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsPositionedDelete();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsPositionedDelete()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsPositionedDelete()");
            throw sqle;
        }
    }

    public boolean supportsPositionedUpdate() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsPositionedUpdate();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsPositionedUpdate()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsPositionedUpdate()");
            throw sqle;
        }
    }

    public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsResultSetConcurrency(type, concurrency);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsResultSetConcurrency(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsResultSetConcurrency(int)");
            throw sqle;
        }
    }

    public boolean supportsResultSetHoldability(int holdability) throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsResultSetHoldability(holdability);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsResultSetHoldability(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsResultSetHoldability(int)");
            throw sqle;
        }
    }

    public boolean supportsResultSetType(int type) throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsResultSetType(type);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsResultSetType(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsResultSetType(int)");
            throw sqle;
        }
    }

    public boolean supportsSavepoints() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsSavepoints();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsSavepoints()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsSavepoints()");
            throw sqle;
        }
    }

    public boolean supportsSchemasInDataManipulation() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsSchemasInDataManipulation();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsSchemasInDataManipulation()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsSchemasInDataManipulation()");
            throw sqle;
        }
    }

    public boolean supportsSchemasInIndexDefinitions() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsSchemasInIndexDefinitions();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsSchemasInIndexDefinitions()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsSchemasInIndexDefinitions()");
            throw sqle;
        }
    }

    public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsSchemasInPrivilegeDefinitions();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsSchemasInPrivilegeDefinitions()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsSchemasInPrivilegeDefinitions()");
            throw sqle;
        }
    }

    public boolean supportsSchemasInProcedureCalls() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsSchemasInProcedureCalls();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsSchemasInProcedureCalls()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsSchemasInProcedureCalls()");
            throw sqle;
        }
    }

    public boolean supportsSchemasInTableDefinitions() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsSchemasInTableDefinitions();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsSchemasInTableDefinitions()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsSchemasInTableDefinitions()");
            throw sqle;
        }
    }

    public boolean supportsSelectForUpdate() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsSelectForUpdate();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsSelectForUpdate()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsSelectForUpdate()");
            throw sqle;
        }
    }

    public boolean supportsStatementPooling() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsStatementPooling();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsStatementPooling()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsStatementPooling()");
            throw sqle;
        }
    }

    public boolean supportsStoredProcedures() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsStoredProcedures();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsStoredProcedures()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsStoredProcedures()");
            throw sqle;
        }
    }

    public boolean supportsSubqueriesInComparisons() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsSubqueriesInComparisons();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsSubqueriesInComparisons()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsSubqueriesInComparisons()");
            throw sqle;
        }
    }

    public boolean supportsSubqueriesInExists() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsSubqueriesInExists();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsSubqueriesInExists()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsSubqueriesInExists()");
            throw sqle;
        }
    }

    public boolean supportsSubqueriesInIns() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsSubqueriesInIns();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsSubqueriesInIns()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsSubqueriesInIns()");
            throw sqle;
        }
    }

    public boolean supportsSubqueriesInQuantifieds() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsSubqueriesInQuantifieds();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsSubqueriesInQuantifieds()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsSubqueriesInQuantifieds()");
            throw sqle;
        }
    }

    public boolean supportsTableCorrelationNames() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsTableCorrelationNames();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsTableCorrelationNames()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsTableCorrelationNames()");
            throw sqle;
        }
    }

    public boolean supportsTransactionIsolationLevel(int level) throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsTransactionIsolationLevel(level);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsTransactionIsolationLevel(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsTransactionIsolationLevel(int)");
            throw sqle;
        }
    }

    public boolean supportsTransactions() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsTransactions();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsTransactions()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsTransactions()");
            throw sqle;
        }
    }

    public boolean supportsUnion() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsUnion();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsUnion()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsUnion()");
            throw sqle;
        }
    }

    public boolean supportsUnionAll() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.supportsUnionAll();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "supportsUnionAll()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "supportsUnionAll()");
            throw sqle;
        }
    }

    public boolean updatesAreDetected(int type) throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.updatesAreDetected(type);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updatesAreDetected(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updatesAreDetected(int)");
            throw sqle;
        }
    }

    public boolean usesLocalFilePerTable() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.usesLocalFilePerTable();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "usesLocalFilePerTable()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "usesLocalFilePerTable()");
            throw sqle;
        }
    }

    public boolean usesLocalFiles() throws SQLException {

        connection.updateLastAccess();
        try {
            return metaData.usesLocalFiles();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "useLocalFiles()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "useLocalFiles()");
            throw sqle;
        }
    }

    protected void info(Object message, Throwable error) {

        connection.info(message, error);
    }

    protected void info(Object message) {

        connection.info(message);
    }

    protected void debug(Object message, Throwable error) {

        connection.trace(message, error);
    }

    protected void debug(Object message) {

        connection.trace(message);
    }

    protected void error(Object message, Throwable error) {

        connection.error(message, error);
    }

    protected void error(Object message) {

        connection.error(message);
    }

    protected void warn(Object message, Throwable error) {

        connection.warn(message, error);
    }

    protected void warn(Object message) {

        connection.warn(message);
    }
}
